#pragma once
// -------------------------------------------------
// BlinKit - BlinKit Library
// -------------------------------------------------
//   File Name: win_theme_engine.h
// Description: WinThemeEngine Class
//      Author: Ziming Li
//     Created: 2019-03-15
// -------------------------------------------------
// Copyright (C) 2019 MingYang Software Technology.
// -------------------------------------------------

#ifndef BLINKIT_WIN_THEME_ENGINE_H
#define BLINKIT_WIN_THEME_ENGINE_H

#include "blinkit/blink/public/platform/web_theme_engine.h"
#include "third_party/skia/include/core/SkPaint.h"

namespace BlinKit {

class ThemePainter;

class WinThemeEngine final : public WebThemeEngine
{
public:
    WinThemeEngine(void);
    virtual ~WinThemeEngine(void);
private:
    const SkPaint* AdjustPaint(Part part) const;

    // WebThemeEngine
    IntSize GetViewportSize(Part part) override;
    void paint(WebCanvas *canvas, Part part, State state, const IntRect &rect, const ExtraParams *extra) override;

    using GetMetricsType = decltype(GetSystemMetricsForDpi) *;
    GetMetricsType m_getMetrics;

    SkPaint m_paintSrcATop;
    std::unique_ptr<ThemePainter> m_themePainter;
};

} // namespace BlinKit

#endif // BLINKIT_WIN_THEME_ENGINE_H
